package com.yylending.las.common.location.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by laixj on 2016/11/16.
 * Copyright © 2016 www.yyfax.com. All Rights Reserved.
 */
public class Address implements Parcelable{
	public String province;
	public String city;
	public String district;

	public Address() {
	}

	public Address(String province, String city, String district) {
		this.province = province;
		this.city = city;
		this.district = district;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Override
	public String toString() {
		return (province==null?"":province)+(city==null?"":city)+(district==null?"":district);
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(this.province);
		dest.writeString(this.city);
		dest.writeString(this.district);
	}

	protected Address(Parcel in) {
		this.province = in.readString();
		this.city = in.readString();
		this.district = in.readString();
	}

	public static final Creator<Address> CREATOR = new Creator<Address>() {
		@Override
		public Address createFromParcel(Parcel source) {
			return new Address(source);
		}

		@Override
		public Address[] newArray(int size) {
			return new Address[size];
		}
	};
}
